Package-level declarations

Types

Link copied to clipboard
@SinceKotoolsTypes(version = "1.0")
value class NonZeroInt : IntType

Type representing integers that can't equal 0.

Link copied to clipboard
@SinceKotoolsTypes(version = "1.0")
value class StrictlyNegativeInt : IntType

Type representing strictly negative integers (< 0).

Link copied to clipboard
@SinceKotoolsTypes(version = "1.0")
value class StrictlyPositiveInt : IntType

Type representing strictly positive integers (> 0).

Properties

Link copied to clipboard
@SinceKotoolsTypes(version = "1.0")
val Int.nonZero: NonZeroInt

Transforms the current Int to a NonZeroInt, or throws an IllegalArgumentException if the current value is 0.

Link copied to clipboard
@SinceKotoolsTypes(version = "1.0")
val Int.nonZeroOrNull: NonZeroInt?

Transforms the current Int to a NonZeroInt, or returns null if the current value is 0.

Link copied to clipboard
@SinceKotoolsTypes(version = "1.0")
val Int.strictlyNegative: StrictlyNegativeInt

Transforms the current Int to a StrictlyNegativeInt, or throws an IllegalArgumentException if the current value is not lower than 0.

Link copied to clipboard
@SinceKotoolsTypes(version = "1.0")
val Int.strictlyNegativeOrNull: StrictlyNegativeInt?

Transforms the current Int to a StrictlyNegativeInt, or returns null if the current value is not lower than 0.

Link copied to clipboard
@SinceKotoolsTypes(version = "1.0")
val Int.strictlyPositive: StrictlyPositiveInt

Transforms the current Int to a StrictlyPositiveInt, or throws an IllegalArgumentException if the current value is not greater than 0.

Link copied to clipboard
@SinceKotoolsTypes(version = "1.0")
val Int.strictlyPositiveOrNull: StrictlyPositiveInt?

Transforms the current Int to a StrictlyPositiveInt, or returns null if the current value is not greater than 0.